package com.example.enterprise.service;

import com.example.enterprise.dao.HiddenDangerMapper;
import com.example.enterprise.entity.HiddenDangerExample;
import com.example.enterprise.entity.HiddenDangerWithBLOBs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HiddenDangerService {
    @Autowired
    private HiddenDangerMapper hiddenDangerMapper;
    public List<HiddenDangerWithBLOBs> findHiddenDanger(int offset, int limit) {
        HiddenDangerExample example = new HiddenDangerExample();
        example.setOrderByClause("id desc limit " + offset + "," + limit);
        List<HiddenDangerWithBLOBs> hiddenDangerWithBLOBs = hiddenDangerMapper.selectByExampleWithBLOBs(example);
        return hiddenDangerWithBLOBs;
    }
}
